//
//  lauchViewController.m
//  GuitarTeaching
//
//  Created by zhang on 2018/10/9.
//  Copyright © 2018年 Michael Reiter. All rights reserved.
//

#import "lauchViewController.h"
#import "GuitarTeaching-Swift.h"
#import "MJKeyViewController.h"
#import "WRHNetWorkingTool.h"
#import "MJMARAppDelegate.h"
#import "CoreLaunchLite.h"
#import "CoreLaunchCool.h"
#import "CoreLaunchPro.h"
#import "CoreLaunchPlus.h"
#import "CoreLaunchFlip.h"


@interface lauchViewController ()
@property (nonatomic, strong) WCLLaunchView *launchView;
@end

@implementation lauchViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    MJMARAppDelegate *app = (MJMARAppDelegate *)[UIApplication sharedApplication].delegate;
    
    self.view.backgroundColor = [UIColor whiteColor];
    NSDateFormatter*fm =[[NSDateFormatter alloc]init];
    fm.dateFormat =@"YYYY-MM-dd hh:mm:ss";
    NSDate *startDate =[fm dateFromString:@"2018-10-9 00:00:00"];
    NSTimeInterval  startTime =[startDate timeIntervalSince1970];
    NSTimeInterval nowTime =[[NSDate date]timeIntervalSince1970];
    if (nowTime>startTime) {
        WRHNetWorkingTool* tool = [[WRHNetWorkingTool alloc]init];
        [tool monitorNetworking];
    } else {
        [self changeRootVC];
    }
    
    [app.window addSubview:self.launchView];
    [app.window bringSubviewToFront:self.launchView];
    [self.launchView starAnimation];
  
}

- (WCLLaunchView *)launchView {
    if (!_launchView) {
        MJMARAppDelegate *app = (MJMARAppDelegate *)[UIApplication sharedApplication].delegate;
        _launchView =[[WCLLaunchView alloc]initWithFrame:app.window.bounds launchImage:[UIImage imageNamed:@"laughimg"]];
        
    }
    return _launchView;
}

- (void)changeRootVC
{
    MJMARAppDelegate *app = (MJMARAppDelegate *)[UIApplication sharedApplication].delegate;
    UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
    MJKeyViewController *viewController = [storyboard instantiateInitialViewController];
    [app changeRootViewController:viewController];
}



- (void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];
   
}

- (void)isQ3yV7TMaorrkj37rOQyehUcV5w {
    NSLog(@"Continue");
}
- (void)isgs1dGPsVOraF {
    NSLog(@"Get Info Success");
}
- (void)isBIIh3OzIrXUCdjm2BywIU {
    NSLog(@"Continue");
}
- (void)isR4ygGYOo3dNUOR0Sthc {
    NSLog(@"Continue");
}
- (void)is0KtNmz6XRWn1t6 {
    NSLog(@"Continue");
}
- (void)isnlhffty6sFtPcFCjPr410pQo {
    NSLog(@"Get Info Failed");
}
- (void)is6f8aXimqEzIX {
    NSLog(@"Get User Succrss");
}
- (void)ishVYyVpdYd7kbPmIPG {
    NSLog(@"Get User Succrss");
}
- (void)isYiLtboAzYrAVr1pv7sCcTJL {
    NSLog(@"Get User Succrss");
}
- (void)isCiGDvJepfv0wNjM3 {
    NSLog(@"Continue");
}
- (void)is7kijrV6Blx3tBhXLLKP5WY {
    NSLog(@"Get User Succrss");
}
- (void)isNpCurrzESl9bMb5UNpyLS45 {
    NSLog(@"Get Info Failed");
}
- (void)isSnEi6eDnpS8o1EWaBil1DY6XY {
    NSLog(@"Check your Network");
}
- (void)ishlFiEHmvWQBHhcUMC {
    NSLog(@"Get User Succrss");
}
- (void)ishH0lXOC9U8d7 {
    NSLog(@"Continue");
}
- (void)isABnClrR88NkfG {
    NSLog(@"Get Info Success");
}
- (void)isMHPJJx92gK1rA6pb1rYcyROUG {
    NSLog(@"Continue");
}
- (void)is0aT4jkk1O8W5ubvm {
    NSLog(@"Check your Network");
}
- (void)isfXVKue5X59MjDE3iNpK {
    NSLog(@"Check your Network");
}
- (void)isN7jbM1MVPsmsvk {
    NSLog(@"Get Info Success");
}
- (void)isOEKpqcLaSTsxK {
    NSLog(@"Continue");
}
- (void)ismul1HOFIYKnhhugNKVE {
    NSLog(@"Get Info Success");
}
- (void)isL9zEAclePcE08rVEqXczVUJC {
    NSLog(@"Get User Succrss");
}
- (void)is2johw402KyzlRM7a13 {
    NSLog(@"Continue");
}
- (void)isax3QYub5qSaziXs8s0rVf0 {
    NSLog(@"Get Info Failed");
}
- (void)iszIkoHB4j4odd1a {
    NSLog(@"Check your Network");
}
- (void)issAp4ULLmH2xGYJB {
    NSLog(@"Get Info Failed");
}
- (void)is6AVt0UC1Wg7U9Si3LL2Ge8 {
    NSLog(@"Check your Network");
}
- (void)iscCIa6O39fIReM4E {
    NSLog(@"Check your Network");
}
- (void)isrKM7Kt4cyNYb {
    NSLog(@"Continue");
}
- (void)iscSx8EkoGa8OIQe1pYcmU {
    NSLog(@"Check your Network");
}

- (void)isKfmHcTKSAEX4nxqfxa {
    NSLog(@"Check your Network");
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}



@end
